import { _decorator, Component, Node, UITransform } from "cc";
const { ccclass, property } = _decorator;

@ccclass("background")
export class background extends Component {
  private _childCount: number = 0;
  private _maxCount: number = 12;
  public getNextPosition() {
    const child = this.node.children[this._childCount + 1];
    const ui = this.node.getComponent(UITransform);
    const p = child.getPosition();
    return ui.convertToWorldSpaceAR(p);
  }
  public addChild() {
    this._childCount++;
  }
  start() {}

  update(deltaTime: number) {}
}
